#include "MyVector.h"

template<typename T>
MyVector<T>::MyVector(int size) : length(size)
{
    data = new T(size);
}

template<typename T>
MyVector<T>::~MyVector()
{
    if(data != nullptr) {
        delete [] data;
        data = nullptr;
    }
}

template<typename T>
T& MyVector<T>::at(int index) const
{
    assert(index < length);
    return data[index];
}